package 作业4;
import java.util.Scanner;
public class Demo3 {
     public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入字符串");
        String str = sc.nextLine();//输入
        String restr = new StringBuilder(str).reverse().toString();//反转
        System.out.println(restr);//输出
     }
}
